import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";

// import ElementUI from 'element-ui';
// import 'element-ui/lib/theme-chalk/index.css';

import Element from './elementLoader'
Vue.use(Element)
// 引入乾坤
import {
  registerMicroApps,
  start,
} from 'qiankun'

/* eslint-disable */

console.log(process.env);
const apps = [{
  name: 'vueApp',
  entry: '//localhost:10000', // 默认回加载这个html 解析里面的js动态的执行(子应用必须支持跨域) fetch
  container: '#vue', // 容器名
  activeRule: '#/vue', // 激活的路径
  props: {
    mainRouter: router,
    elementCom: Element
  }
}]

registerMicroApps(apps) // 注册应用
start({ 
  // prefetch: 'all' // 预加载
})


Vue.config.productionTip = false;

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount("#app");